package exception;

public class TestDemo {
    public static void main(String[] args) {

        try {
            int [] arr = {1,2,3,4,5};
            System.out.println(arr[0]);
            System.out.println(arr[5]);
        }catch (ArrayIndexOutOfBoundsException e){
            System.out.println("数组下标越界");
        }
        System.out.println("程序执行完毕");
    }
}
